<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>    
<div class="search">
	<a href="${ctx}/" class="logo"><img src="${ctx}/images/logo.png" alt="LOGO" /></a>
	<div class="r">
		<input type="text" id="searchName" name="searchName" placeholder="新款女连衣裙" value="${searchName}"/>
		<button onclick="findSearch();"></button>
		<a href="${ctx }/cart/cartPage">
		      <span>我的购物车  
		       <i><%=cartItemsCount%></i>
	         </span>
	      </a>
	</div>
</div>

<script type="text/javascript">
	/***商品搜索*************/
	function findSearch(){
		var searchName = $("#searchName").val();
		if(searchName==null || searchName==""){
			return false;
		}
		var url = "${ctx}/goodsClass/queryGoodsClassList?searchName="+searchName;
		window.location.href = url;
	}
	$(function(){
		/***回车事件*****/
		$('#searchName').keydown(function(e){
			if(e.keyCode==13){
			  	findSearch();
			}
		});
		/*********/
	});
</script>	